package com.example.esskill.service;

import com.example.esskill.service.impl.MyBusinessException;

import java.util.List;

/**
 * ClassName: EsQueryDataService <br/>
 * Description: <br/>
 * date: 2024/2/4 14:10<br/>
 *
 * @author LXC<br />
 * @since JDK 1.8
 */
public interface EsQueryDataService {
    public <T> List<T> termQuery(String indexName, String columnName, Object value, Class<T> classz) throws MyBusinessException;
    public <T> List<T> termsQuery(String indexName, String columnName, Object[] dataArgs, Class<T> classz) throws MyBusinessException;
    public <T> List<T>  matchAllQuery(String indexName, Class<T> classz, int startIndex, int pageSize, List<String> orderList, String columnName, Object value) throws MyBusinessException;
    public <T> List<T> matchPhraseQuery(String indexName, Class<T> classz, String columnName, Object value) throws MyBusinessException;
    public <T> List<T> matchMultiQuery(String indexName, Class<T> classz, String[] fields, Object text) throws MyBusinessException;
    public <T> List<T> wildcardQuery(String indexName, Class<T> classz,String field, String text) throws MyBusinessException;
    public <T> List<T> fuzzyQuery(String indexName, Class<T> classz, String field, String text) throws MyBusinessException;
    public  <T> List<T> boolQuery(String indexName, Class<T> beanClass) throws MyBusinessException;
    public void metricQuery(String indexName) throws MyBusinessException, Exception;
    public void bucketQuery(String indexName,String bucketField, String bucketFieldAlias) throws MyBusinessException;
    public void subBucketQuery(String indexName,String bucketField, String bucketFieldAlias,String avgFiled,String avgFiledAlias) throws MyBusinessException;
    public void subSubAgg(String indexName) throws MyBusinessException;
}
